summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorsijanec <anton@sijanec.eu>2021-03-18 18:19:25 +0100
committersijanec <anton@sijanec.eu>2021-03-18 18:19:25 +0100
commit19ae55a7b714e8f30ad2419e2a4a24a8c3d23bd9 (patch)
treecc628014c56f46577b721fba40e5ff5f4fd4293e /Makefile
parentremoved network debugger (diff)
downloaddiscord.c-19ae55a7b714e8f30ad2419e2a4a24a8c3d23bd9.tar
discord.c-19ae55a7b714e8f30ad2419e2a4a24a8c3d23bd9.tar.gz
discord.c-19ae55a7b714e8f30ad2419e2a4a24a8c3d23bd9.tar.bz2
discord.c-19ae55a7b714e8f30ad2419e2a4a24a8c3d23bd9.tar.lz
discord.c-19ae55a7b714e8f30ad2419e2a4a24a8c3d23bd9.tar.xz
discord.c-19ae55a7b714e8f30ad2419e2a4a24a8c3d23bd9.tar.zst
discord.c-19ae55a7b714e8f30ad2419e2a4a24a8c3d23bd9.zip
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile21
1 files changed, 16 insertions, 5 deletions
diff --git a/Makefile b/Makefile
index 1ea322b..f0511ae 100644
--- a/Makefile
+++ b/Makefile
@@ -1,9 +1,20 @@
+DESTDIR=/
+
default:
- gcc -Wall -pedantic -g -Ilib -Isrc -I. -pthread $$(ncursesw6-config --cflags --libs) src/main.c -lcurl -lformw -lm -odiscord.c
-prepare:
- wget https://raw.githubusercontent.com/DaveGamble/cJSON/master/cJSON.c -O lib/cJSON.c
- wget https://raw.githubusercontent.com/DaveGamble/cJSON/master/cJSON.h -O lib/cJSON.h
+ gcc -Wall -pedantic -g -Isrc -I. -pthread $$(ncursesw6-config --cflags --libs) src/main.c -lcjson -lcurl -lformw -lm -odiscord.c
+
+install:
+ mkdir -p $(DESTDIR)/usr/bin/
+ cp discord.c $(DESTDIR)/usr/bin/
+
+distclean:
+ rm discord.c -f
+
clean:
- rm lib/cJSON.c lib/cJSON.h
+ rm discord.c -f
+
+prepare:
+ sudo apt install libncursesw6 libcurl4-openssl-dev libcjson-dev -y
+
valgrind:
valgrind --leak-check=full --show-leak-kinds=all --track-origins=yes --verbose --log-file=valgrind-out.txt --suppressions=/usr/lib/valgrind/ncurses.supp --suppressions=misc/openssl.supp ./discord.c